load("//bzl:cpp_unittest.bzl", "cpp_unittest")

cpp_unittest(
    name = "atomic_read_mostly_main_ptr_test",
    srcs = ["AtomicReadMostlyMainPtrTest.cpp"],
    deps = [
        "//folly/concurrency/memory:atomic_read_mostly_main_ptr",
        "//folly/portability:gtest",
    ],
)

cpp_unittest(
    name = "read_mostly_shared_ptr_stress_test",
    size = "medium",
    srcs = ["ReadMostlySharedPtrStressTest.cpp"],
    deps = [
        "//folly/concurrency/memory:read_mostly_shared_ptr",
        "//folly/portability:gtest",
    ],
)

cpp_unittest(
    name = "read_mostly_shared_ptr_test",
    srcs = ["ReadMostlySharedPtrTest.cpp"],
    deps = [
        "//folly:memory",
        "//folly/concurrency/memory:read_mostly_shared_ptr",
        "//folly/portability:gtest",
        "//folly/synchronization:baton",
    ],
)

cpp_unittest(
    name = "primary_ptr_test",
    srcs = ["PrimaryPtrTest.cpp"],
    deps = [
        "//folly/concurrency/memory:primary_ptr",
        "//folly/executors:cpu_thread_pool_executor",
        "//folly/executors:manual_executor",
        "//folly/portability:gtest",
        "//folly/synchronization:baton",
    ],
)

cpp_unittest(
    name = "ref_count_test",
    srcs = ["RefCountTest.cpp"],
    deps = [
        "//folly/concurrency/memory:tl_ref_count",
        "//folly/portability:gtest",
        "//folly/synchronization:baton",
        "//folly/synchronization/test:barrier",
    ],
)
